SRCS:= $(wildcard *.c)
OBJS:= $(SRCS:%.c=%.o)
EXES:= $(SRCS:%.c=%)

CC=gcc
CFLAGS+= -O2 -Wall -D_GNU_SOURCE_ -g
LINK_FLAGS+= -O2 -g
LDFLAGS+= $(shell pkg-config --libs zlog)
INC_FLAGS+= -I.

all     :       $(EXES)

$(EXES)  :       %:%.o
	$(CC) $(LINK_FLAGS) -o $@ $^ $(LDFLAGS) 

#.c.o	:
#	$(CC) $(CFLAGS) -o $@ -c $< $(INC_FLAGS) 

#.cpp.o	:
#	$(CC) $(CFLAGS) -o $@ -c $< $(INC_FLAGS) 

class_static:class_static.cpp hello_qt.cpp
	g++ -o $@ $< 

hello_qt:hello_qt.cpp
	arm-hismall-linux-g++ -o$@ $< -DQWS -fno-rtti -Wall -I$(HOME)/qt/qt-hisi-2.2.0/qtopia-free-2.2.0/qt2/include -lqte -L$(HOME)/qt/qt-hisi-2.2.0/qtopia-free-2.2.0/qtopia/lib -Wl,-rpath-link=/home/lzhong/qt/qt-hisi-2.2.0/build/lib


hello_client:hello_client.cpp
	arm-hismall-linux-g++ -o$@ $< -DQWS -I$(HOME)/qt/qt-hisi-2.2.0/qtopia-free-2.2.0/qt2/include -lqte -L$(HOME)/qt/qt-hisi-2.2.0/qtopia-free-2.2.0/qtopia/lib -Wl,-rpath-link=/home/lzhong/qt/qt-hisi-2.2.0/build/lib

clean	:
	rm -f *.o $(EXES) *.log class_static hello_qt a.out hello_client

.PHONY : clean all
